import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { HydratedDocument } from 'mongoose';

export type HDDInfoDocumentType = HydratedDocument<HDD_Info>;

@Schema()
export class HDD_Info {
  @Prop({ required: true, index: true })
  manufacturers: string;
  @Prop({ required: true, index: true })
  cache: string;
  @Prop({ required: true, index: true })
  capacity: string;
  @Prop({ required: true, index: true })
  interfaceSpeed: string;
  @Prop({ required: true, index: true })
  interfaceType: string;
  @Prop({ required: true, index: true })
  rotationalSpeed: string;
  @Prop({ required: true, index: true })
  price: number;
  @Prop({ required: true, index: true })
  img_url_arr: string[];
  @Prop({ required: true })
  score: number; // 性能评分
}

export const HDD_InfoSchema = SchemaFactory.createForClass(HDD_Info);
